package cn.bisoft.java.bean.entity;

import java.io.Serializable;



/**
 * This is an object that contains data related to the AnteIssueFlag table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="AnteIssueFlag"
 */

public abstract class BaseAnteIssueFlag  implements Serializable {
	private static final long serialVersionUID = 1L;
	public static String REF = "AnteIssueFlag";
	public static String PROP_FLAG = "flag";
	public static String PROP_FLAG_NAME = "flagName";


	// constructors
	public BaseAnteIssueFlag () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseAnteIssueFlag (java.lang.Integer flag) {
		this.setFlag(flag);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseAnteIssueFlag (
		java.lang.Integer flag,
		java.lang.String flagName) {

		this.setFlag(flag);
		this.setFlagName(flagName);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer flag;

	// fields
	private java.lang.String flagName;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="assigned"
     *  column="Flag"
     */
	public java.lang.Integer getFlag () {
		return flag;
	}

	/**
	 * Set the unique identifier of this class
	 * @param flag the new ID
	 */
	public void setFlag (java.lang.Integer flag) {
		this.flag = flag;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: FlagName
	 */
	public java.lang.String getFlagName () {
		return flagName;
	}

	/**
	 * Set the value related to the column: FlagName
	 * @param flagName the FlagName value
	 */
	public void setFlagName (java.lang.String flagName) {
		this.flagName = flagName;
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof AnteIssueFlag)) return false;
		else {
			AnteIssueFlag anteIssueFlag = (AnteIssueFlag) obj;
			if (null == this.getFlag() || null == anteIssueFlag.getFlag()) return false;
			else return (this.getFlag().equals(anteIssueFlag.getFlag()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getFlag()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getFlag().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}